<div id="search_peopletag_block">
<input name="search peopletag" id="search_peopletag" value="<?php echo $criteria; ?>"/>
<input type=button value="Search" onclick="search_peopletags_button_pressed();"/>
<br/>
<input name="new_peopletag_name" id="new_peopletag_name" value=""/>
<input type=button value="Create New PeopleTag" onclick="create_new_peopletag();"/>
</div>
<div id="search_peopletag_results">
<?php if($criteria) { ?>
Search results for <?php echo $criteria; ?>:
<?php } else { ?>
Top peopletags on Oximity:
<?php } ?>
<table><tr><td>
<?php
$counter = 0;
foreach($peopletags as $peopletag)
{
	echo '<a href="javascript:addThisPeopleTag('.$peopletag->idpeople.')">'.$peopletag->name.'</a>';
	echo '</td>';
	$counter++;
	if(!($counter % 4))
	{
		echo '</tr><tr>';
	}
	echo '<td>';
} 
?>
</td></tr></table>
</div>
<?php if(false && $show_all_available) { ?>
<input type=button value="Show all results" onclick="search_peopletags( <?php echo $criteria; ?>, true);"/>
<?php } ?>
<input type=button id="peopletag_results_previous" value="Previous results" onclick="search_peopletags(<?php echo  "'".$criteria."', false, ". ($offset-20); ?>);" <?php if($offset < 20) echo 'disabled="disabled"'; ?>/>
<input type=button id="peopletag_results_next" value="Next results" onclick="search_peopletags(<?php echo  "'".$criteria."', false, ". ($offset+20); ?>);" <?php if(count($peopletags) < 20) echo 'disabled="disabled"'; ?>/>
<input type=button value="Cancel" onclick="cancel_popup_dlg();"/>
